<wicket:panel>
	<div class="modal-header">
		<h5 wicket:id="title" class="modal-title"></h5>
		<button wicket:id="close" type="button" class="close"><wicket:svg href="times" class="icon"/></button>
	</div>
	<div wicket:id="content" class="modal-body insert-url"></div>
	
	<wicket:fragment wicket:id="tabbedFrag">
		<ul wicket:id="tabs" class="tabs nav nav-tabs nav-tabs-line nav-bold mb-5"></ul>
		<div wicket:id="content"></div>
	</wicket:fragment>
	<wicket:fragment wicket:id="inputUrlFrag">
		<form wicket:id="form" class="input-url">
			<div wicket:id="feedback" class="feedback"></div>
			<div class="form-group">
				<label wicket:id="urlLabel" class="control-label"></label>
				<input wicket:id="url" class="form-control url"></input>
				<p wicket:id="urlHelp" class="form-text text-muted"></p>
			</div>		
			<div class="form-group">
				<label wicket:id="textLabel" class="control-label"></label>
				<input wicket:id="text" class="form-control text"></input>
			</div>	
			<div class="actions clearfix">
				<a wicket:id="cancel" class="btn btn-secondary float-right ml-2">Cancel</a>
				<button wicket:id="insert" type="submit" class="dirty-aware btn btn-primary float-right">Insert</button>	
			</div>
		</form>
	</wicket:fragment>
	<wicket:fragment wicket:id="pickBlobFrag">
		<div wicket:id="files" class="files"></div>
	</wicket:fragment>
	<wicket:fragment wicket:id="pickAttachedImageFrag">
		<ul class="attachments list-unstyled">
			<li wicket:id="attachments" class="attachment image">
				<a wicket:id="select" title="Insert this image" class="insert mx-auto d-block mb-2"><img wicket:id="image"></img></a>
				<a wicket:id="delete" title="Remove this image" class="delete btn btn-light-danger">Remove</a>
			</li>
		</ul>
		<div wicket:id="noAttachments" class="alert alert-light-warning">No image attachments</div>
	</wicket:fragment>
	<wicket:fragment wicket:id="pickAttachedFileFrag">
		<ul class="attachments list-unstyled">
			<li wicket:id="attachments" class="attachment file d-flex">
				<a wicket:id="select" title="Insert link to this file" class="insert btn btn-block btn-light btn-hover-primary flex-grow-1 mr-2"><span wicket:id="file"></span></a>
				<a wicket:id="delete" title="Remove this file" class="delete btn btn-light-danger btn-icon btn-hover-danger flex-shrink-0"><wicket:svg href="trash" class="icon"></wicket:svg></a>
			</li>
		</ul>
		<div wicket:id="noAttachments" class="alert alert-light-warning">No file attachments</div>
	</wicket:fragment>
	<wicket:fragment wicket:id="uploadAttachmentFrag">
		<form wicket:id="form" class="upload-attachment">
			<div wicket:id="feedback" class="feedback"></div>
			<div wicket:id="file"></div>
			<div class="text-right mt-4">
				<a wicket:id="cancel" class="btn btn-secondary float-right ml-2">Cancel</a>
				<button wicket:id="insert" type="submit" class="dirty-aware btn btn-primary">Insert</button>
			</div>
		</form>
	</wicket:fragment>
	<wicket:fragment wicket:id="uploadBlobFrag">
		<form wicket:id="form" class="upload-blob">
			<div wicket:id="feedback" class="feedback"></div>
			<div class="form-group">
				<div wicket:id="file"></div>
			</div>
			<div class="form-group directory">
  				<label>Directory</label>
  				<div class="input-group">
					<input wicket:id="directory" class="form-control"></input> 
					<span class="input-group-append">
						<a wicket:id="select" title="Select" class="btn btn-outline-secondary btn-icon"><wicket:svg href="folder-open" class="icon"></wicket:svg></a>
					</span>
  				</div>
				<p class="form-text text-muted">Optionally specify relative directory to put uploaded files</p>
			</div>			
			<div class="form-group">
  				<label>Commit Message</label>
				<textarea wicket:id="commitMessage" placeholder="Add files via upload" class="form-control" rows="6"></textarea>
			</div>			
			<div class="text-right">
				<a wicket:id="cancel" class="btn btn-secondary float-right ml-2">Cancel</a>
				<button wicket:id="insert" class="btn btn-primary dirty-aware">Commit &amp; Insert</button>		    
			</div>
		</form>
	</wicket:fragment>
</wicket:panel>